package com.hbun.cxcy.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hbun.cxcy.entity.Dept;
import com.hbun.cxcy.mapper.DeptMapper;
import com.hbun.cxcy.service.DeptService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.sql.Wrapper;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author mahaunyu
 * @since 2022-01-24
 */
@Service
public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements DeptService {





    @Override
    public void removeByIdsWithCustom(List<Long> deptIds) {


        for (int i = 0; i < deptIds.size(); i++) {
            Long id = deptIds.get(i);
            Dept dept = this.baseMapper.selectById(id);
            dept.setStatus(0);
            this.updateById(dept);
        }

    }
}
